package com.oracle.application.feign;

import com.oracle.application.feign.vo.UserVo;
import com.oracle.application.vo.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author 李源浩
 * @Date 2021/7/7 11:13
 * @Version 1.0
 */
@FeignClient(value = "cloud-user-service",path = "/user")
public interface UserFeign {

    //测试查询所有
    @GetMapping("/list")
    public List<UserVo> list();

    //用户登录
    @GetMapping("/login")
    public R<UserVo> login(@RequestParam("loginnames") String loginnames,@RequestParam("pwd") String pwd);

    //用户注测
    @PostMapping("/addUser")
    public R<UserVo> addUser(@RequestBody UserVo userVo);

    //用户修改信息
    @PutMapping("/updateUser")
    public R<UserVo> updateUser(@RequestBody UserVo userVo);

    //发送验证码
    @GetMapping("/email")
    public R checkedRandom(@RequestParam("email") String email);

    //比较验证码
    @GetMapping("/ym")
    public R<UserVo> ym(@RequestParam("ym") String ym);
}
